Skip to content

fix(desktop): stop shipping demo content as TaskComposer initial values#349

Merged
ceilf6 merged 1 commit into
developfrom
improve/desktop-composer-defaults
Jun 14, 2026
Merged

fix(desktop): stop shipping demo content as TaskComposer initial values#349
ceilf6 merged 1 commit into
developfrom
improve/desktop-composer-defaults

Conversation

@ceilf6

@ceilf6 ceilf6 commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Linked Issue Or Context

Closes #347

Summary

TaskComposer seeded its React state with hardcoded demo content (a fake task 为登录页添加深色模式切换 plus ~/projects/login-page / http://localhost:5173), so a freshly launched desktop app greeted users with pre-filled fake content and the textarea's placeholder never showed. This is the same class of leftover as the #344 footer cleanup, missed in the composer.

Changes (single file, apps/desktop/src/renderer/components/TaskComposer.tsx):

  • Default task, workspacePath, browserUrl to empty strings so placeholders show on first launch.
  • Add placeholders to the workspace (~/projects/your-app) and URL (http://localhost:5173(可选)) inputs, which previously had none.
  • Add a canRun guard (task and workspace both non-empty) used by both submit() and the run button's disabled state, so the now-empty workspace default cannot launch an invalid run. browserUrl stays optional.

Impact Scope

Renderer-only, leaf component. No store, IPC, or contract changes.

GitNexus Impact Summary

  • Risk level: LOW
  • Critical skeleton changes: none (leaf renderer component)
  • GitNexus impact: detect_changes → changed symbols TaskComposer + submit (same file), 1 affected process App → Submit (steps 2–3) — exactly the expected scope. impact(TaskComposer, upstream) → LOW, 1 direct caller (App), 1 process, 1 module (Components).
  • Verification: see below.

Verification

  • pnpm --filter @frontagent/desktop typecheck — clean.
  • pnpm --filter @frontagent/desktop test — 13 files, 96 tests passing.
  • biome check on the file — clean (formatted).
  • pnpm quality:precommit ran via pre-commit hook — lint shows only the pre-existing useTemplate info in hallucination-guard (unrelated), typecheck/test green.

Note on tests: apps/desktop follows an established no-DOM-test architecture (logic lives in the store layer; components are not unit-tested). Per the repo-guard issue note, the verification intent (empty initial values + placeholders) is covered by the typecheck + the contained diff rather than a new component test, to avoid breaking that convention. Happy to add a lightweight render assertion if maintainers prefer.

Checklist

  • I have linked an issue or explained why this PR stands alone.
  • I have kept the diff focused on the stated change.
  • I have run pnpm quality:precommit, or explained why it could not run.
  • I have run pnpm quality:local for critical skeleton changes, or explained why it could not run. — N/A, not a critical skeleton change.
  • I have updated docs or tests when behavior, public APIs, or Harness contracts changed. — no public API/contract change; test convention noted above.
  • For critical skeleton changes, I have filled the GitNexus impact summary with concrete results. — filled despite being non-critical.

🤖 Generated with Claude Code

The composer seeded React state with a fake task and hardcoded paths, so
a freshly launched app showed pre-filled demo content and never surfaced
the textarea placeholder. Default all three fields to empty, add
placeholders to the workspace/URL inputs, and gate the run button + submit
on a `canRun` guard (task and workspace both non-empty) so the now-empty
workspace default can't launch an invalid run.

Closes #347

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🛡️ ceilf6/repo-guard

代码评审报告: fix(desktop): stop shipping demo content as TaskComposer initial values

风险等级:
处理建议: 批准
决策摘要: ** 可以合并;变更范围与 Issue #347 一致,移除了生产首屏 demo 初始值,并用 canRun 避免空任务/空工作区触发运行。

级联分析

  • 变更符号: 原始模型未提供结构化级联字段。
  • 受影响流程: 原始模型未提供结构化级联字段。
  • 变更集外调用方: unknown
  • 置信度: degraded

问题发现

模型未返回可结构化的问题发现;已提取可用的决策字段,原始非契约内容未附在评论中。

行级发现

  • 无明确变更行归属。

Karpathy 评审

  • 假设: 模型输出需要归一化为固定 Markdown 契约。
  • 简洁性: 已提取 summary、finding、evidence 与 fix;原始 prose 不再附在评论中,避免占用下游解析与代理上下文。
  • 变更范围: 原始模型未提供结构化范围字段。
  • 验证: 需要查看 CI、测试或人工 CR 证据补强合并信心。

缺失覆盖

  • 输出未命中 Repo Guard Markdown 契约;建议补充真实模型质量评估覆盖。

@ceilf6 ceilf6 merged commit 096690d into develop Jun 14, 2026
11 checks passed
@ceilf6 ceilf6 deleted the improve/desktop-composer-defaults branch June 14, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(desktop): TaskComposer ships hardcoded demo content as initial field values

1 participant